<template>
	<view class="container">
		<u-cell-group v-if="isSetedpass==0">
			<u-cell-item title="设置支付密码" :arrow="false" @tap="navigateToSetpaypass()">
				<u-icon name="/static/icon_zy_189.png" size="18" slot="right-icon"></u-icon>
			</u-cell-item>
		</u-cell-group>
		<u-cell-group v-if="isSetedpass==1">
			<u-cell-item title="找回支付密码" :arrow="false" @tap="navigateToUpdatepass()">
				<u-icon name="/static/icon_zy_189.png" size="18" slot="right-icon"></u-icon>
			</u-cell-item>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				isSetedpass:-1
			}
		},
		created() {
		     const userInfo = uni.getStorageSync('userInfo'); 
			 if(userInfo.isPayPassword == '1'){
				 this.isSetedpass=1;
			 }else if(userInfo.isPayPassword == '0'){
				 this.isSetedpass=0;
			 }
		},
		methods: {
			navigateToSetpaypass(){
				uni.navigateTo({
					url:'setpaypass/setpaypass'
				});
			},
			navigateToUpdatepass(){
				uni.navigateTo({
					url:'updatepaypass/updatepaypass'
				});
			}
		}
	}
</script>

<style lang="scss">
     page{
		 width: 100%;
		 height: 100%;
	 }
	 .container{
		 width: 100%;
		 height: 100%;
		 background-color: #F4F8FB;
	 }
</style>
